In a network environment, a packet needs to be forwarded from a source node to a destination node along a forwarding path, so that a data packet is forwarded, and data is transmitted. The source node is also referred to as an ingress node (Ingress Node), and the destination node is also referred to as an egress node (Egress Node). In a mechanism of using a label to forward a packet, such as a multiprotocol label switching (MPLS) mechanism or a segment routing mechanism, the forwarding path is also referred to as a label switched path (LSP). For a network environment in which multiple links reach a same destination address, if a conventional routing technology is used, a packet sent to the destination address occupies one of the links, and the other links are in a standby state or an invalid state. Some links on a forwarding node are congested because excessive packets need to be sent, and remaining links on the forwarding node are in an idle state.
By using an equal-cost multipath (ECMP) technology, a packet flow may be forwarded on a source node by using a non-congested link, but a packet flow cannot be forwarded on another forwarding node by using a non-congested link, that is, load imbalance cannot be resolved by using the ECMP technology.